<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Bootstrap Admin Theme v3</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <!-- styles -->
    <link href="css/styles.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
<%
	String isMatch = request.getParameter("isMatch");
	out.write("<SCRIPT language="+"'"+"JavaScript"+"'"+">var isMatch="+"'"+isMatch+"'"+";</SCRIPT>");
%>

<script>
	if(isMatch == "false") {
		alert("账户或密码错误!");
	}
</script>
<body class="login-bg" >
  	<div class="header">
	     <div class="container">
	        <div class="row">
	           <div class="col-md-12">
	              <!-- Logo -->
	              <div class="logo">
	                 <h1 style="color:white">管理员登陆界面</h1>
	              </div>
	           </div>
	        </div>
	     </div>
	</div>
	
<form class="form-horizontal" action="AdminLogin" method="GET" name="register_inf" id="register_inf" onsubmit="return clicksubmit()">
	<div class="page-content container" >
		<div class="row">
			<div class="col-md-4 col-md-offset-4">
				<div class="login-wrapper">
			        <div class="box">
			            <div class="content-wrap">
			                <h6>管理员登陆</h6>			           
			                <input class="form-control" type="text" placeholder="账号" name="userid" id="userid">
			                <input class="form-control" type="password" placeholder="密码" name="password" id="password">
			                <div class="action" >
			                    <button type="submit" class="btn btn-primary" >登陆</button>	
			                </div>                
			            </div>
			        </div>

			        <div class="already">
			            <p>没有账号?</p>
			            <a href="signup.jsp">注册</a>
			        </div>
			    </div>
			</div>
		</div>
	</div>
</form>


<div role="tabpanel" class="tab-pane active" id="user">

				<div class="modal fade" id="addUser" role="dialog"
					aria-labelledby="gridSystemModalLabel">
					<div class="modal-dialog" role="document">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal"
									aria-label="Close">
									<span aria-hidden="true">&times;</span>
								</button>
								<h4 class="modal-title" id="gridSystemModalLabel">管理员注册</h4>
							</div>
							<div class="modal-body">
								<div class="container-fluid">
									<form class="form-horizontal" method="GET"
										action="AddLibrarian">
										<div class="form-group ">
											<label for="lname" class="col-xs-3 control-label">用户名：</label>
											<div class="col-xs-8 ">
												<input type="" class="form-control input-sm duiqi inputnotnull"
													 name="lname" placeholder="">
											</div>
										</div>
										<div class="form-group">
											<label for="lpassword" class="col-xs-3 control-label">密码：</label>
											<div class="col-xs-8 ">
												<input type="" class="form-control input-sm duiqi inputnotnull"
													 name="lpassword" placeholder="">
											</div>
										</div>
										<div class="form-group">
											<label for="email" class="col-xs-3 control-label">联系方式：</label>
											<div class="col-xs-8 ">
												<input type="" class="form-control input-sm duiqi inputnotnull"
													 name="email" placeholder="">
											</div>
										</div>


										<div class="modal-footer">
											<button type="button" class="btn btn-xs btn-white"
												data-dismiss="modal">取消</button>
											<button type="submit" class="btn btn-xs btn-green checkbutton">注册</button>
										</div>
									</form>
								</div>
							</div>

						</div>
						<!-- /.modal-content -->
					</div>
					<!-- /.modal-dialog -->
				</div>
				<!-- /.modal -->


    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://code.jquery.com/jquery.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="js/custom.js"></script>
    <script src="js/jquery-3.3.1.min.js"></script>
	<script src="js/jquery.validate.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
    <script type="text/javascript">
	    var adminid ='<%=request.getAttribute("admin_id")%>';
	    console.log(adminid);
	    if(adminid!='null'&&adminid!=0&& typeof(adminid)!="undefined"){
			 alert("您好，您的注册账号为"+adminid);
		}

    </script>
    <script type="text/javascript">
		function clicksubmit()
		{
			if(register_inf.userid.value=="")
			{
			window.alert("请输入管理员账号");
			register_inf.userid.focus();
			return false;
			}
			
			if(register_inf.password.value=="")
			{
			window.alert("请输入密码");
			register_inf.password.focus();
			return false;
			}
		}
		
	</script>
  </body>
</html>
</html>